package com.gxa.common;

import io.jsonwebtoken.Claims;

/**
 * Created with IntelliJ IDEA.
 *
 * @author bq
 * Date: 2020/10/21 14:24
 * Description:
 * Version: V1.0
 */
public class JwtResult {
    /**
     * 错误编码。在JWTUtils中定义的常量。
     * 200为正确
     */
    private int errCode;
    /**
     * 是否成功，代表结果的状态。
     */
    private boolean success;
    /**
     * 验证过程中payload中的数据。
     */
    private Claims claims;

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public Claims getClaims() {
        return claims;
    }

    public void setClaims(Claims claims) {
        this.claims = claims;
    }

    @Override
    public String toString() {
        return "JwtResult{" +
                "errCode=" + errCode +
                ", success=" + success +
                ", claims=" + claims +
                '}';
    }
}